#include "lib_a.h"
#include <iostream>

namespace LibA {
    void init() {
        std::cout << "LibA: Initializing..." << std::endl;
        LibB::init();
        LibC::init();
        LibD::init();
    }
    
    void process() {
        std::cout << "LibA: Processing..." << std::endl;
        LibB::process_data(42);
        LibC::log_message("LibA is processing");
        LibD::add_item(42);
        int count = LibD::get_item_count();
        std::cout << "LibA: LibD has " << count << " items" << std::endl;
        int result = LibB::get_result();
        std::cout << "LibA: Got result from LibB: " << result << std::endl;
    }
    
    void finalize() {
        std::cout << "LibA: Finalizing..." << std::endl;
        LibD::clear_items();
    }
}